package hcn.protocol.phr.healthrecord;

import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.List;

/**
 * 健康档案:体检记录列表 返回数据
 *
 * @author lidq
 */
@XmlRootElement(name = "response")
@XmlAccessorType(XmlAccessType.FIELD)
public class ExaminationRecordsResultBean implements Serializable {

    private static final long serialVersionUID = -2454901722756768315L;

    private Integer code;

    private String msg;

    private Body body;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Body getBody() {
        return body;
    }

    public void setBody(Body body) {
        this.body = body;
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Body {

        private String mpiid;

        @XmlElementWrapper(name = "items")
        private List<YearData> yearData;

        public String getMpiid() {
            return mpiid;
        }

        public void setMpiid(String mpiid) {
            this.mpiid = mpiid;
        }

        public List<YearData> getYearData() {
            return yearData;
        }

        public void setYearData(List<YearData> yearData) {
            this.yearData = yearData;
        }
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class YearData {
        private String mpiid;
        // 年份
        private String year;
        // 总条数
        @JsonIgnore
        private Integer total;
        // 是否有更多
        private Boolean hasmore;
        // 门诊记录
        @XmlElementWrapper(name = "recordList")
        private List<Record> record;

        public String getMpiid() {
            return mpiid;
        }

        public void setMpiid(String mpiid) {
            this.mpiid = mpiid;
        }

        public String getYear() {
            return year;
        }

        public void setYear(String year) {
            this.year = year;
        }

        public Integer getTotal() {
            return total;
        }

        public void setTotal(Integer total) {
            this.total = total;
        }

        public Boolean getHasmore() {
            return hasmore;
        }

        public void setHasmore(Boolean hasmore) {
            this.hasmore = hasmore;
        }

        public List<Record> getRecord() {
            return record;
        }

        public void setRecord(List<Record> record) {
            this.record = record;
        }
    }

    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Record {
        // 记录标识
        private String dcid;
        // 医院code
        private String orgCode;
        // 医院名称
        private String orgName;
        // 体检日期 yyyy-MM-dd
        private String   checkupDate;
        // 总检日期 yyyy-MM-dd
        private String   alwaysCheckDate;

        public String getDcid() {
            return dcid;
        }

        public void setDcid(String dcid) {
            this.dcid = dcid;
        }

        public String getOrgCode() {
            return orgCode;
        }

        public void setOrgCode(String orgCode) {
            this.orgCode = orgCode;
        }

        public String getOrgName() {
            return orgName;
        }

        public void setOrgName(String orgName) {
            this.orgName = orgName;
        }

        public String getCheckupDate() {
            return checkupDate;
        }

        public void setCheckupDate(String checkupDate) {
            this.checkupDate = checkupDate;
        }

        public String getAlwaysCheckDate() {
            return alwaysCheckDate;
        }

        public void setAlwaysCheckDate(String alwaysCheckDate) {
            this.alwaysCheckDate = alwaysCheckDate;
        }
    }
}
